home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 3 / 003.d81 / dos part 4 < prev    next >
Text File  |  2022-08-26  |  3KB  |  159 lines

  1.        DOS n' Don'ts -- Part 4
  2.        === == ======    ==== =
  3.  
  4. Written by Joel Ellis Rea
  5.         of Loadstar
  6.  
  7.  
  8. Last issue we discussed the format-
  9.  
  10. ting (NEWing) of a new disk, and the
  11.  
  12. LOADing and SAVE-ing of BASIC prog-
  13.  
  14. rams.  This time we will cover some
  15.  
  16. maintenance commands such as how to
  17.  
  18. remove a program that is no longer
  19.  
  20. needed, how to change the name of a
  21.  
  22. program, how to get rid of all un-
  23.  
  24. closed files on a disk, etc.  As al-
  25.  
  26. ways, we will use the DOS Wedge ver-
  27.  
  28. sions of disk commands.
  29.  
  30.  
  31. Maintenance commands are sent by the
  32.  
  33. Wedge to the Command Channel of the
  34.  
  35. disk drive.  Without the Wedge, you
  36.  
  37. would have to type:
  38.  
  39.    OPEN 15,8,15: PRINT#15, 'command':
  40.    CLOSE 15
  41.  
  42. to send the command string 'command'
  43.  
  44. to the disk drive.  With the Wedge,
  45.  
  46. you need only type:
  47.  
  48.    @command
  49.  
  50.      or
  51.  
  52.    >command
  53.  
  54. For our examples, we will use the '@'
  55.  
  56. prefix.  It does not need the SHIFT
  57.  
  58. key like the '>' prefix, but you may
  59.  
  60. use whichever you prefer.
  61.  
  62.  
  63. The NEW command discussed last issue
  64.  
  65. is an example of a maintenance com-
  66.  
  67. mand.  Such commands are performed by
  68.  
  69. the disk drive itself.  The 64 only
  70.  
  71. passes the command from you to the
  72.  
  73. drive.
  74.  
  75.  
  76. The simplest of the maintenance com-
  77.  
  78. mands is the Display Disk Status com-
  79.  
  80. mand.  This is actually a Wedge spe-
  81.  
  82. cial, since you cannot just print this
  83.  
  84. command to the Command Channel.  To do
  85.  
  86. a Display Disk Status, just type:
  87.  
  88.    @
  89.  
  90. and hit RETURN.  It's that simple.  If
  91.  
  92. all is well, the screen will display:
  93.  
  94.    @              <-- You typed this
  95.    00, OK,00,00   <-- Computer says!
  96.  
  97. This means that the Disk Status is OK!
  98.  
  99. If the red drive light is flashing
  100.  
  101. steadily, that means an error condi-
  102.  
  103. tion.  The disk drive 'knows' what the
  104.  
  105. error is, but since it does not con-
  106.  
  107. trol the serial bus, it cannot 'speak'
  108.  
  109. unless 'spoken to'.  By typing '@',
  110.  
  111. you request the current status of the
  112.  
  113. drive.  An example of an error:
  114.  
  115.    /BADPRG  <-- LOAD 'BADPRG'
  116.  
  117.    SEARCHING FOR BADPRG
  118.    LOADING  <-- Drive 'clatters'!
  119.    READY.   <-- Red light blinking!
  120.    @        <-- Display Disk Status
  121.    20, READ ERROR,17,12
  122.  
  123. The first number displayed, in this
  124.  
  125. case 20, is the Error Code.  The text
  126.  
  127. following the Error Code is a brief
  128.  
  129. description of the error, called the
  130.  
  131. Error Message.  The second number is
  132.  
  133. (usually) the track on which the er-
  134.  
  135. ror occurred, called the Error Track,
  136.  
  137. and the last number is the sector of
  138.  
  139. the Error Track on which the error oc-
  140.  
  141. curred, the Error Sector.  So this
  142.  
  143. response means that there was a READ
  144.  
  145. ERROR code 20 while trying to read
  146.  
  147. sector 12 of track 17.  Once the Disk
  148.  
  149. Status has been displayed, the red
  150.  
  151. light stops flashing and further Disk
  152.  
  153. Status commands will return the OK
  154.  
  155. message until the next error.
  156.  
  157.         <Continued in Part 5>
  158. --------------------------------------
  159.